package tt.dz.order.vo;

import org.apache.commons.lang.StringUtils;

import tt.dz.order.exception.ParamLackException;
import tt.dz.order.exception.ParamNotFoundInSystemException;

/**
 * @Title 分润规则
 * @author zhoutian   
 * @date 2015-11-26
 */
public class DivideInfo extends BaseVo {
	//参与分润的运营商编号（以逗号分隔）
	private String merchantCodes;
	//桩的编号
	private String keyLink;
	//电站Id
	private String plantId;
	//分润比例（以逗号分隔）
	private String ratios;
	//保底金额（以逗号分隔）(传空值，则表明每一个保定金额都为0，反之将每个分润商的保底金额传递过来)
	private String minAmount;

	public String getMerchantCodes() {
		return merchantCodes;
	}

	public void setMerchantCodes(String merchantCodes) {
		this.merchantCodes = merchantCodes;
	}

	public String getKeyLink() {
		return keyLink;
	}

	public void setKeyLink(String keyLink) {
		this.keyLink = keyLink;
	}

	public String getPlantId() {
		return plantId;
	}

	public void setPlantId(String plantId) {
		this.plantId = plantId;
	}

	public String getRatios() {
		return ratios;
	}

	public void setRatios(String ratios) {
		this.ratios = ratios;
	}

	public String getMinAmount() {
		return minAmount;
	}

	public void setMinAmount(String minAmount) {
		this.minAmount = minAmount;
	}

	public DivideInfo() {}
	
	public void validate() throws ParamLackException, ParamNotFoundInSystemException{
		if(StringUtils.isBlank(merchantCodes)){
			throw new ParamLackException("merchantCodes为空");
		}
		if(StringUtils.isBlank(ratios)){
			throw new ParamLackException("ratios为空");
		}
	}
}
